<?php

namespace app\admin\controller;

use think\Controller;
use think\Request;
use think\Db;

class Daidan extends Base
{
    /**
     * 显示资源列表
     *
     * @return \think\Response
     */
    public function index()
    {
        return view();
    }

    public function listAll()
    {
        $data = Db::table('tp_customer')
            ->join('tp_order', 'tp_customer.cid = tp_order.cid')
            ->where('tp_customer.brand','EXP','<>tp_order.brand')
            ->field('tp_customer.brand,tp_customer.seller,tp_customer.cid,tp_order.brand AS brand2,tp_order.oid,tp_order.name,tp_order.date,tp_order.price')
            ->select();
        echo json_encode($data, JSON_UNESCAPED_UNICODE);
    }
}
